{{if validation_errors()}}
<ul class="message error">
    <li>{{validation_errors()}}</li>
</ul>
{{/if}}

<div class="clear"></div>
<form class="block-content form" id="simple_form" method="post" action="create">
    <h1>{{$partner->lang->line('partner')}}</h1>
    <ul class="tabs js-tabs same-height">
        <li class="current"><a href="#tab-locales" title="Locales">{{$partner->lang->line('current')}}</a></li>
        <li><a href="#tab-options" title="Options">{{$partner->lang->line('options')}}</a></li>    
    </ul>
    <div class="tabs-content">

        <div id="tab-locales">
            {{if isset($partner->id)}}{{form_hidden('id', $partner->id)}}{{/if}}

            <fieldset class="grey-bg required">			
                <legend>{{$partner->lang->line('required')}}</legend>
                <p>
                    <label>{{$partner->localize_label('name')}}</label>
                    <input type="text" name="name" id="simple-required" value="{{if isset($partner->name)}}{{$partner->name}}{{/if}}" class="full-width">
                    {{form_error('name')}}
                </p>

                <p>
                    <label>{{$partner->localize_label('code')}}</label>
                    <input type="text" name="code" id="simple-required" value="{{if isset($partner->code)}}{{$partner->code}}{{/if}}" class="full-width">
                    {{form_error('code')}}
                </p>
            </fieldset>
        </div>
        <div id="tab-options">
            <fieldset>
                <legend>{{$partner->lang->line('options')}}</legend>

                <p>
                    <label>{{$partner->lang->line('homepage')}}</label>				
                    <input type="text" name="homepage" class="full-width" value="{{if isset($partner->homepage)}}{{$partner->homepage}}{{/if}}">				
                </p>

                <p>                   
                    <label>{{$partner->lang->line('description')}}</label>
                    <textarea name="description" cols="10" class="full-width text-editor tinymcesimple">{{if isset($partner->description)}}{{$partner->description}}{{/if}}</textarea>

                </p>
                <p>
                <label for="simple-select">{{$partner->lang->line('language')}}</label>
                <select name="lang_id" id="simple-select" class="full-width">
                    {{html_options options=$language->get_list() selected=$partner->language_id}}
                </select>
            </p>
            </fieldset>
        </div>
        <br><br><br><br>
        <fieldset class="grey-bg no-margin">
            <legend>{{$partner->lang->line('action')}}</legend>
            <p class="input-with-button">
                <button type="submit">{{$partner->lang->line('save')}}</button>
            </p>
        </fieldset>	

    </div>
</form>
